package com.psp.sp.service;

import com.psp.sp.controller.res.bean.ROrderDetailBean;
import com.psp.sp.controller.res.bean.ROrderListBean;
import com.psp.sp.service.exception.ServiceException;
import com.psp.sp.service.impl.PageResult;

public interface OrderService {

	/**
	 * 获取订单详情
	 * 
	 * @param uid
	 * @param oid
	 * @return
	 */
	ROrderDetailBean getDetail(String uid, String oid);

	/**
	 * 订单列表
	 * 
	 * @param page
	 *            当前请求页，从0开始
	 * @param pageSize
	 *            当前请求页的大小 10
	 * @param uid
	 *            用户id
	 * @param state
	 *            订单状态
	 * @return
	 */
	PageResult<ROrderListBean> getList(int page, int pageSize, String uid, int state);

	/**
	 * 接单
	 * 
	 * @param uid
	 * @param oid
	 * @return
	 */
	boolean receive(String uid, String oid) throws ServiceException;

	/**
	 * 拒绝订单
	 * 
	 * @param uid
	 * @param oid
	 * @return
	 */
	boolean refuse(String uid, String oid) throws ServiceException;

}
